package com.db.springcloud.service;

import com.db.springcloud.mapper.UserMapper;
import com.db.springcloud.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService{

    @Autowired
    UserMapper userMapper;

    public boolean addUser(User user) {
        return userMapper.addUser(user);
    }

    public User queryById(int id) {
        return userMapper.queryById(id);
    }

    public List<User> queryAll() {
        return userMapper.queryAll();
    }
}
